<%@ page language="java"
	import="java.util.*,bc.swim2.ejb.entity.AbilityRequest"
	contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Ability Requests</title>
<style>
@import url(css/main.css);
</style>
</head>
<body>
	<div id="allContainer">
		<div id="singleContainer">
			<h1 id="pageTitle">ABILITY REQUESTS:</h1>
			<a href="MainServlet?to=AdminHome" id="linkRef">Home</a> <br> <a
				href="LoginServlet?methodName=logout" id="linkRef">Logout</a>
			<%
				List<AbilityRequest> abilityRequests = null;
				abilityRequests = (List<AbilityRequest>) request
						.getAttribute("abilityRequestList");
			%><table>
				<%
					for (AbilityRequest ar : abilityRequests) {

						String name = ar.getName();
						String description = ar.getDescription();
				%>
				<tr>
					<td>
						<h1 id="listTitle"><%=name%></h1>
					</td>
				</tr>
				<tr>
					<td><div id="acapo"><%=description%></div></td>
				</tr>
				<tr>
					<td>
						<div id="hor">
							<form action=AbilityRequestServlet method="POST">
								<input type="hidden" name="abilityRequestId"
									value=<%=ar.getId()%>> <input type="hidden"
									name="methodName" value="remove"> <input type="submit"
									id="submitInputA" value="Remove">
							</form>
						</div>
						<div id="hor">
							<form action=AbilityServlet method="POST">
								<input type="hidden" name="name" value=<%=name%>> <input
									type="hidden" name="methodName" value="add"> <input
									type="submit" id="submitInputA" value="Add this ability">
							</form>
						</div>
					</td>
				</tr>
				<%
					}
				%>
			</table>
		</div>
	</div>
</body>
</html>